package game.manager
{
	import flash.events.Event;
	import flash.events.EventDispatcher;

	/**
	 * 用户的属性的管理
	 * 里面包含了一些分数等内容
	 */  
	public class ProfileManager extends EventDispatcher
	{
		private static var _instance:ProfileManager;
		
		public static const SCORE_CHANGE:String = "score_change";
		
		public function ProfileManager()
		{
			_instance = this;
		}
		
		public static function get instance():ProfileManager {
			if(_instance == null){
				_instance = new ProfileManager();
			}
			return _instance;
		}
		
		private var _score:int = 0; // 用户的分数
		
		public function get score():int{
			return _score;
		}
		public function set score(s:int):void{
			this._score = s;
			dispatchEvent(new Event(SCORE_CHANGE));
		}

	}
}